﻿@model eShop.Web.Admin.Models.ProductListModel

@section header{
    <title>下架商品</title>
    <link type="text/css" rel="stylesheet" href="/administration/css/site.css" />
    <link type="text/css" rel="stylesheet" href="/administration/css/style.css" />
    <script type="text/javascript" src="/administration/scripts/jquery.js"></script>
    <script type="text/javascript" src="/administration/scripts/showlist.js"></script>
    <link rel="stylesheet" type="text/css" href="/components/jbox/Skins/Default/jbox.css" />
    <script type="text/javascript" src="/components/jbox/jquery.jBox-2.3.min.js"></script>
    <script type="text/javascript" src="/administration/scripts/selectlist.js"></script>
    <script type="text/javascript" src="/administration/scripts/product.js"></script>
    <script type="text/javascript">
        $(function () {
            $('.tablelist tbody tr:odd').addClass('odd');
        });
        productPageType = 2;
    </script>
}
@section body{
    <h1 class="rightH1">
        商品管理 &gt;&gt; 下架商品
        <div class="right">
            @*<a href="@Url.Action("addsku")" class="menuBT">
                <img src="/administration/images/add.jpg" />添加SKU</a>*@
            <a href="@Url.Action("addproduct")" class="menuBT">
                <img src="/administration/images/add.jpg" />添加商品
            </a>
            <div class="clear">
            </div>
        </div>
        <div class="clear">
        </div>
    </h1>
    @using (Html.BeginForm())
    {

        <div class="dataListSearch">
            <table height="32">
                <tbody>
                    <tr>
                        <td width="35"><img id="searchImg" src="/administration/images/search1.gif" /></td>
                        <td>商品分类：</td>
                        <td width="100">
                            <div class="selectBt">
                                <input type="button" value="@Model.CategoryName" onclick="openCategorySelectLayer(this)" style="height:22px; line-height:2px;background:url(/administration/images/selectbgico.gif) no-repeat 6px center; padding-left:22px; padding-right:10px;" />
                                <input type="hidden" class="CateId" id="CateId" name="CateId" value="@Model.CateId" />
                                <input type="hidden" class="CategoryName" id="CategoryName" name="CategoryName" value="@Model.CategoryName" />
                            </div>
                        </td>
                        <td>商品品牌：</td>
                        <td width="80">
                            <div class="selectBt">
                                <input type="button" value="@Model.BrandName" onclick="openBrandSelectLayer(this)" style="height:22px; line-height:2px;background:url(/administration/images/selectbgico.gif) no-repeat 6px center; padding-left:22px; padding-right:10px;" />
                                <input type="hidden" class="BrandId" id="BrandId" name="BrandId" value="@Model.BrandId" />
                                <input type="hidden" class="BrandName" id="BrandName" name="BrandName" value="@Model.BrandName" />
                            </div>
                        </td>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品名称：</td>
                        <td width="180">@Html.TextBox("ProductName", Model.ProductName, new { height = "28", size = "30" })</td>
                        <td><input id="SearchProduct" name="SearchProduct" type="image" class="searchBut submit" src="/administration/images/s.jpg" /></td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div style="padding-left:15px;">
            <table class="tablelist">
                <thead>
                    <tr>
                        <th><input type="checkbox" id="allSelect" /></th>
                        <th>编号</th>
                        <th>名称</th>
                        <th>精品</th>
                        <th>热销</th>
                        <th align="center">新品</th>
                        <th align="center">排序</th>
                        <th align="center">价格</th>
                        <th align="center">默认仓库</th>
                        <th align="center">库存量</th>
                        @*<th align="center">±库存</th>*@
                        <th align="left">管理操作</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (DataRow row in Model.ProductList.Rows)
                    {
                        <tr>
                            <td align="left"><input type="checkbox" value="@row["pid"]" selectItem="true" name="pidList" /></td>
                            <td>@row["pid"]</td>
                            <td>@row["name"]</td>
                            <td align="center">
                                @{
                                    if (row["isbest"].ToString() == "0")
                                    {
                                        <span style=" cursor:pointer" url="@Url.Action("changeproductisbest", new { pidList = row["pid"] })" isbest="0" class="isbestspan">
                                            否
                                        </span>
                                    }
                                    else
                                    {
                                        <span style=" cursor:pointer" url="@Url.Action("changeproductisbest", new { pidList = row["pid"] })" isbest="1" class="isbestspan">
                                            是
                                        </span>
                                    }
                                }
                            </td>
                            <td align="left">
                                @{
                                    if (row["ishot"].ToString() == "0")
                                    {
                                        <span style=" cursor:pointer" url="@Url.Action("changeproductishot", new { pidList = row["pid"] })" ishot="0" class="ishotspan">
                                            否
                                        </span>
                                    }
                                    else
                                    {
                                        <span style=" cursor:pointer" url="@Url.Action("changeproductishot", new { pidList = row["pid"] })" ishot="1" class="ishotspan">
                                            是
                                        </span>
                                    }
                                }
                            </td>
                            <td align="left">
                                @{
                                    if (row["isnew"].ToString() == "0")
                                    {
                                        <span style=" cursor:pointer" url="@Url.Action("changeproductisnew", new { pidList = row["pid"] })" isnew="0" class="isnewspan">
                                            否
                                        </span>
                                    }
                                    else
                                    {
                                        <span style=" cursor:pointer" url="@Url.Action("changeproductisnew", new { pidList = row["pid"] })" isnew="1" class="isnewspan">
                                            是
                                        </span>
                                    }
                                }
                            </td>
                            <td align="left"> <input type="text" url="@Url.Action("updateproductdisplayorder", new { pid=row["pid"]})" value="@row["displayorder"]" class="sortinput unselectedsortinput" /></td>
                            <td align="right"><input type="text" url="@Url.Action("updateproductshopprice", new { pid = row["pid"] })" value="@row["shopprice"]" style=" width:70px;" class="shoppriceinput unselectedsortinput" /></td>
                            <td align="center">@row["stockmc"]</td>
                            @*<td align="center"><input type="text" url="@Url.Action("updateproductstocknumber", new { pid = row["pid"] })" value="@row["number"]" class="stockinput unselectedsortinput" /></td>*@
                            <td>@row["number"]</td>
                            @*<td align="center"><input type="text" url="@Url.Action("addstocknumber", new { pid = row["pid"],stockid=row["stockid"] })" value="0" class="stockinput unselectedsortinput" /></td>*@
                            <td>
                                @Html.ActionLink("[图片]", "productimagelist", new { pid = row["pid"] }, new { @class = "editOperate" })|
                                @Html.ActionLink("[关联商品]", "relateproductlist", new { pid = row["pid"] }, new { @class = "editOperate" })|
                                <a href="#" class="onsaletag editOperate" url="@Url.Action("onsaleproduct", new { pidList = row["pid"] })">[上架]</a>|
                                @Html.ActionLink("[编辑]", "editproduct", new { pid = row["pid"] }, new { @class = "editOperate" })|
                                @Html.ActionLink("[删除]", "recycleproduct", new { pidList = row["pid"] }, new { @class = "deleteOperate" })
                            </td>
                        </tr>
                                    }
                </tbody>
            </table>
        </div>
        <div class="dataListEdit">
            <a href="javascript:void(0)" onSaleUrl="@Url.Action("onsaleproduct")" class="batch batchOnSale">批量上架</a>
            <a href="javascript:void(0)" recycleUrl="@Url.Action("recycleproduct")" class="batch batchRecycle">批量删除</a>
            <div class="page">
                @Html.AdminPager(Model.PageModel)
            </div>
        </div>
                                    }
}